package com.lancoo.ccas53.pojo.common;

/**
 * @Author: liufeng
 * @CreateTime: 2024-07-16  11:47
 * @Description:
 */
public enum ConflictType {
    TeachingClass(1, "教学班冲突"),
    Room(2, "教室冲突"),
    Teacher(3, "教师冲突"),
    Student(4, "学生冲突"),
    Class(6, "行政班冲突");

    private int code;
    private String msg;

    ConflictType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static ConflictType getByCode(int code) {
        for (ConflictType value : ConflictType.values()) {
            if (value.getCode() == code) {
                return value;
            }
        }
        return null;
    }
}

